Improvement to the fast metal matrix computation #1073
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current fast metal matrix computation ignores the change of r_perp . It's a small correction for contaminants such as the cross-correlation of Lya with SiII(1260A) ( 1.4% change of rt , which is negligible effect given that the correlation is concentrated at small rt), but it's larger for foreground contaminants such as CIV.
In this PR I implement the fast computation of the distortion with r_perp. Distortion matrices for r_par and r_perp are computed separately. The full metal matrix elements are the product of both. It works because each matrix acts only on the sub index corresponding to r_par or r_per.
Validation with comparison with the "brute force" method (picca_metal_dmat.py):
First Lya x SiII(1260A) metal matrix along the line of sight (first rt bins) as a function of rp (the true input correlation is xi(rp<4)=1 and xi(rp>4)=0 :
Then CIV x CIV metal matrix transverse to the line of sight (rp<4) for different values of rt_true:
(This method will be presented during a DESI WG meeting.)
The effect on the fit of the Lya auto and Lya-QSO cross-correlation is almost completely negligible, but it seems to me that it's important to have correct metal matrices in the code ...